package com.api.shihua.action;

import com.api.shihua.util.LogTool;
import weaver.interfaces.workflow.action.Action;
import weaver.soa.workflow.request.RequestInfo;

public class NewChangeRewardAction implements Action {

    @Override
    public String execute(RequestInfo requestInfo) {
        LogTool log = new LogTool("/log/zjlbg/",false);
        ChangeRewardActionV2 ChangeRewardActionV2=new ChangeRewardActionV2();
        String result=ChangeRewardActionV2.execute(requestInfo);
        log.writeLog("NewChangeRewardAction--->"+result);
        if(Action.SUCCESS.equals(result)){
            log.writeLog("NewChangeRewardAction--->SUCCESS");
            return Action.SUCCESS;
        }else{
            log.writeLog("NewChangeRewardAction--->NoSUCCESS");
            requestInfo.getRequestManager().setMessageid("10001");
            requestInfo.getRequestManager().setMessage("10001");//提醒信息id
            requestInfo.getRequestManager().setMessagecontent(result);//提醒信息内容
            return Action.FAILURE_AND_CONTINUE;
        }

    }
}
